#ifndef server_h__
#define server_h__

#include <stdint.h>

#define DEFAULT_CONF_FILENAME "lmess_srv.conf"

#define USED_SERVER_PORT        64100
#define USED_CLIENT_PORT        64102

#define MAX_USERNAME_SIZE       64
#define MAX_USERMESSAGE_SIZE    1024

// user command message
#define CMD_USER_SENDMESSAGE    1
#define CMD_USER_CONNECT        2
#define CMD_USER_CONNECTED      3
#define CMD_USER_NOTREGISTER    4
#define CMD_USER_GETLIST        5
#define CMD_USER_LIST           6
#define CMD_BC_MESSAGE          7
#define CMD_PM_MESSAGE          8
#define STATUS_CONNECTED        1   //b0000 0001
#define STATUS_BANNED           2   //b0000 0010
#define STATUS_REGISTERED       4   //b0000 0100

struct user_info_s
{
    uint32_t    userip;
    uint32_t    userstatus;
    char        username[MAX_USERNAME_SIZE];
};

struct user_message_s
{
    uint8_t     type;
    char        data[MAX_USERMESSAGE_SIZE];
};

#endif // server_h__
